package com.ysz.lock;

import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.KeeperException;

import java.util.List;

/**
 * @ClassName Driver
 * @Description 实际操作zk的接口
 * @Data 13:50
 * @Version 1.0
 * @Author ysz
 */
public interface LockInternalsDriver {

    String createsTheLock(CuratorFramework client, String path, byte[] lockNodeBytes) throws Exception;

    Result getsTheLock(CuratorFramework client, List<String> clildrens, String sequenceNodeName, int maxLeases) throws KeeperException.NoNodeException;

    String fixString(String completeWord, String lockName);
}
